import ProForm, { ProFormSelect, ProFormSwitch, ProFormText } from '@ant-design/pro-form';
import React from 'react';

import { menuProps } from '../type';

const MenuForm: React.FC<menuProps> = ({ menus }) => {
  return (
    <ProForm initialValues={menus} submitter={false}>
      <ProFormText name="name" label="菜单名称" />
      <ProFormText name="code" label="code" />
      <ProFormSelect name="parentId" label="上级菜单" />
      <ProFormText name="path" label="路径" />
      <ProFormText name="redirect" label="重定向" />
      <ProFormText name="icon" label="图标" />
      <ProFormSwitch name="hideInMenu" label="是否隐藏" />
    </ProForm>
  );
};

export default MenuForm;
